<?php foreach($result as $item) { ?><option value="<?=$item->id?>" <?=$item->id==$values?'selected="selected"':''?>><?=$item->ten?></option><?php } ?>